<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0">
        <title>获取图片的base64编码</title>
    </head>
 
    <body>
       
        <input type="file" name="file" id="inputBox">
        <button type = "button" id = "clearbtn" >清除</button>
        </br>
        <textarea  style = 'width:400px;height:500px' id = "imgBase64Text" ></textarea>
        <button type = "button" id = "toImg">转图片</button>
        <img id = "imgid" ></img>
        </br>
        <button type = "button" id = "copyBtn">复制base64值</button></br>
        
        <script src="./test.js"></script>
        <div style = 'width:800px;word-wrap: break-word;white-space: normal;word-break:break-all;' id="ptest" overflow-y="scroll" ><div>
    </body>
</html>

